<?
$numAddFields = sizeof($this->allFields);
$leftFields = array_values(array_diff(array_keys($this->allFields), array_keys($this->htmlFields)));
?>
<table width="100%" class="formTable" id="addfields">
<?
while (list ($k, $v) = each($this->htmlFields)) 
{
    echo $v;
}
?>
		</table>
<?
if ($numAddFields) 
{
?>
	<div class="hr"><!--x--></div>
<table width="100%" class="formTable" id="fieldlist_block">
	<tr>
		<td><label>Свойства раздела</label></td>
		<td width="80%"><select name="fieldlist"><?
    for ($i = 0; $i < sizeof($leftFields); $i ++) 
    {
        ?>
			<option value="<?=$leftFields[$i];?>"><?=$this->allFields[$leftFields[$i]]['title'];?></option>
<?
    }
    ?></select>&nbsp;<input type="button" name="addfbutton" id="addfbutton"
			value="Добавить" class="bt"></td>
	</tr>
</table>
<input type="hidden" name="pid" id="pid_val" value="<?=$this->pid;?>">
<?
}
?>
<?=$this->jsBlock;?>